package com.tian.service.impl;

import com.github.pagehelper.PageHelper;
import com.tian.mapper.SceneryMapper;
import com.tian.pojo.Scenery;
import com.tian.pojo.User;
import com.tian.service.SceneryService;
import com.tian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SceneryServiceImpl implements SceneryService {
    @Autowired
    private SceneryMapper sceneryMapper;
    @Override
    public List<Scenery> getAllScenery(Integer page,Integer size) {
        PageHelper.startPage(page,size);
        return sceneryMapper.getAllScenery(page,size);
    }

    @Override
    public void addScenery(Scenery scenery) {
        sceneryMapper.addScenery(scenery);
    }
}
